<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="com.iris.egrant.service.ServiceUtils"%>
<%@page import="java.net.URLEncoder"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>参与人员详细信息</title>
<%@ include file="/common/meta.jsp"%>
<script type="text/javascript" src="${res}/js/jquery/jquery.form.js"></script>
<script type="text/javascript" src="${res}/js/proposal/irisPrpPrepare.js"></script>
<script type="text/javascript" src="${res}/js/validate/irisvalidator.js"></script>
<script type="text/javascript" src="${res}/js/autodisckey/autodisckey.js"></script>

<style type="text/css">
	.input_width { width:130px }
	.select_width { width:143px }
	.table_td td {border:0}
	.long_input{ width:642px }
</style>
<script type="text/javascript">
	
	   function addProduct(val){
			var iVal = parseInt(val);
			var url = "";
			var product_type_name = "";
			switch(iVal){
			    case 1: url='main';product_type_name="专著、论文"; break;
			    case 2: url='main1';product_type_name="专利"; break;
				case 3: url='main2';product_type_name="科技成果奖励"; break;
					}
			if(url == ""){
					$('#lunwen').hide();
					$('#zhuanli').hide();
					$('#jiangli').hide();
					return;
					}
					
			if(url=='main'){
					$('#lunwen').show();
					$('#zhuanli').hide();
					$('#jiangli').hide();
					}
			if(url=='main1'){
				$('#lunwen').hide();
				$('#zhuanli').show();
				$('#jiangli').hide();
			}
			if(url=='main2'){
				$('#lunwen').hide();
				$('#zhuanli').hide();
				$('#jiangli').show();
			}
				
				}				
			</script>
	
	
	
  </head>

  <body>
	
   <c:set var="eXML"><%= ServiceUtils.decodeFromDes3(request.getParameter("srcXML"),com.iris.egrant.service.ServiceConstants.ENCRYPT_KEY)%></c:set>
  <x:parse xml="${eXML}" var="xmlData"/>
	<div dojoType="dialog" id="irisShowMsgDialogTime" bgOpacity="0.1" toggle="fade" toggleDuration="50" lifetime="1000"></div>
  				<table id="mainTable">
  					<tr>
	  					<td>选择成果类型：
	  					<select name="product_type" id="product_type" onchange="addProduct(this.value);">
	  						<option></option>
	  						<option value='1'>专著、论文目录</option>
	  						<option value='2'>专利目录</option>
	  						<option value='3'>科技成果奖励目录</option>
	  					</select>
	  					</td>
  					</tr>
  				</table>
  				
  	<div id="lunwen"  class="word_box" style="display: none">
  		<div id="tabnav">
					<ul>
						<li class="down" id="tab1" onclick="changeTab(this.id)"><a href="###"><span>基本信息</span>
						</a></li>
						<li id="tab2" onclick="changeTab(this.id)"><a href="###"><span>作者详情</span>
						</a></li>
					</ul>
		</div>			
		
	  	<div class="tab_box" id="fragment-tab1">
					<table class="table01" cellpadding="0" cellspacing="0"  width="98%" align="center">
							<tr>
								<td colspan="5" class="t_bar">
								
									&nbsp;学位论文基本信息
									<input type="hidden" maxlength="30" value="${param.product_type_name}" name="product_type_name" style="width:420px">
								</td>
							</tr>
							<tr>
								<td  align="right" rowspan="2">
									<span class="color_red">*</span>标题：
								</td>
								<td align="center">
									中文
								</td>
								<td colspan="3">
									<input type="text" maxlength="200" value="" name="tname" style="width:420px">
								</td>
							</tr>
							<tr>
								<td align="center">
									外文
								</td>
								<td colspan="3">
									<input type="text" maxlength="200" value="" name="en_tname" style="width:420px">
								</td>
							</tr>
							<tr>
								<td  align="right" colspan="2">
									<span class="color_red">*</span>答辩日期：
								</td>
								<td colspan="3">
									<cpt:date id="cg_date"  value="" className="required date" label="出生日期"   name="cg_date"></cpt:date>
								</td>
								
							</tr>
							
							<tr>
							<td  align="right" colspan="2">
									<span class="color_red">*</span>学位：
								</td>
								<td colspan="3">
									<input type="radio" name="btype" id="btype" value="1" class="radioButton" onClick="setRadioSelectedValue(this.value,'btype_value','硕士')"/>硕士
									<input type="radio" name="btype" id="btype" value="2" class="radioButton" onClick="setRadioSelectedValue(this.value,'btype_value','博士')"/>博士
									<input type="radio" name="btype" id="btype" value="3" class="radioButton" onClick="setRadioSelectedValue(this.value,'btype_value','其他')"/>其它
									<input type="hidden" name="btype_name" id="btype_value_name" value=""/>
									<input type="hidden" name="btype_value" id="btype_value" value="" label="学位"/>
								</td>
							</tr>
							<tr>
								<td align="right" colspan="2">
									<span class="color_red">*</span>他人引用次数：
								</td>
								<td colspan="3">
									<input type="text" value="" name="yinyong_num" style="width:195px" class=" required" label="他人引用次数" onfocus="InitInput.setNumber(this,7,0,0)">
								</td>
							</tr>
							
							<tr>
								<td  align="right" colspan="2">
									<span class="color_red">*</span>颁发单位：
								</td>
								<td colspan="3">
									<input type="text" maxlength="30" value="" name="bj_jigou"  style="width:420px" class=" required" label="颁发单位">
								</td>
							</tr>
							
							<tr>
							<td align="right" colspan="2">
									<span class="color_red">*</span>部门：
								</td>
								<td colspan="3">
									<input type="text" value="" name="dept" maxlength="100" style="width:195px" class=" required" label="部门">
								</td>
							</tr>
							
							<tr>
								<td align="right" colspan="2">
									<span class="color_red">*</span>国家或地区：
								</td>
								<td colspan="3">
									<input type="text" value="" name="country"  maxlength="100" style="width:195px" class=" required" label="国家或地区">
								</td>
							</tr>
							<tr>
								<td align="right" rowspan="2">
									<span class="color_red">*</span>描述：<br>（限1000字）
								</td>
								<td align="center">
								中文
								</td>
								<td colspan="3">
								    <textarea name="miaosu" rows="5" cols="50" style="width:420px" class="input_textarea required" label="描述中文" onfocus="InitInput.setMaxLength(this,1000)"></textarea>
									 
								</td>
							</tr>
							<tr>
								<td align="center">
									外文
								</td>
								<td colspan="3">
								<textarea name="en_miaosu" rows="5" cols="50" style="width:420px" class="input_textarea required" label="描述外文" onfocus="InitInput.setMaxLength(this,1000)"></textarea>
								</td>
							</tr>
							<tr>
								<td align="right" rowspan="2">
									<span class="color_red">*</span>关键词：<br>（限1000字）
								</td>
								<td align="center">
								  中文
								</td>
								<td colspan="3">
								 <textarea name="keywords" rows="5" cols="50" style="width:420px" class="input_textarea required" label="关键词中文" onfocus="InitInput.setMaxLength(this,1000)"></textarea>
									
								</td>
							</tr>
							<tr>
								<td align="center">
									外文
								</td>
								<td colspan="3">
								<textarea name="en_keywords" rows="5" cols="50" style="width:420px" class="input_textarea required" label="关键词外文" onfocus="InitInput.setMaxLength(this,1000)"></textarea>
								</td>
							</tr>
							<tr>
								<td  align="right" colspan="2">
									备注(限250字)：
								</td>
								<td colspan="3">
									<textarea rows="5" cols="50" name="remark" style="width:420px" class="input_textarea required" label="备注" onfocus="InitInput.setMaxLength(this,250)"></textarea>
								</td>
							</tr>
							<tr>
								<td  align="right" colspan="2">
									全文链接：
								</td>
								<td colspan="3">
									<input type="text" value="" name="lianjie" style="width:420px" maxlength="100">
									<input type="hidden" value="" name="xmldata" style="width:420px">
									<input type="hidden" value="" name="psn_name" style="width:420px">
									<input type="hidden" value="" name="paiwei" style="width:420px">
									
								</td>
							</tr>
						</table>
				
		</div>
		<div class="tab_box" id="fragment-tab2" style="display: none">
		
					
						<br/>
						<table id="tblResultPsns" class="table01" cellpadding="0" cellspacing="0"  width="98%" align="center">
							<tr >
								<td class="TblHead"  align="center" width="30px"  >选择</td>
								<td class="TblHead"  align="center" width="25px"  >序号</td>
								<td class="TblHead"  align="center" width="50px">姓名</td>
								<td class="TblHead"  align="center" >所在单位</td>
								<td class="TblHead"  align="center" width="80px">电子邮箱</td>
								<td class="TblHead"  align="center" width="80px">是否通讯作者</td>
								<td class="TblHead"  align="center" width="80px">是否本人</td>
							</tr>
							
							<tr style="display:none">
								<td   >
									<input type="radio" class="radiobutton" name="selResultPsns" >
								</td>
								<td >&nbsp;<span  name="persons|person[0]@seq_no" >[index]</span>
								</td>
								<td><input type="text" value="" maxlength="10" name="persons|person[0]|cnamne" class=" required input_text" label="姓名"/></td>
								<td><input type="text" value="" maxlength="30" name="persons|person[0]|org_namne" class=" required input_text" label="所在单位"/></td> 
								<td><input type="text" value="" maxlength="30" name="persons|person[0]|email" required class="required email" label="电子邮箱"/></td>
								<td>
								<input type="checkbox" value=""  class="checkbox" name="flag_corresponding" />
								<input type="hidden" name="persons|person[0]|flag_corresponding_namne"/>
								</td>
								<td>
								<input type="radio" value=""  class="radiobutton" name="flag_own" />
								<input type="hidden" name="persons|person[0]|flag_own_namne"/>
								</td>		
							</tr>
							
							
								<c:set value="0" var="index" scope="page" />
									<x:forEach select="$xmlData/data/persons/person" var="pro">
									
									
												<c:choose>
													<c:when test="${index<10}">
														<c:set value="0" var="flag" scope="page" />
													</c:when>
													<c:otherwise>
														<c:set value="" var="flag" scope="page" />
													</c:otherwise>
												</c:choose>
														<tr>
															<td >
															<input type="radio" class="radiobutton" name="selResultPsns" >
																
															</td>
															<td >
																&nbsp;
																<span name="persons/person[${flag}${index}]@seq_no"><x:out select="$pro/@seq_no"/></span>
															</td>
															<td >
																	<input type="text"  maxlength="10" name="persons/person[${flag}${index}]/cnamne" value="<x:out select="$pro/cnamne" />"/>
															</td>
															<td >
																	<input type="text"  maxlength="30" name="persons/person[${flag}${index}]/org_namne"  value="<x:out select="$pro/org_namne" />"/>
															</td>
															<td >
																	<input type="text" maxlength="30" name="persons/person[${flag}${index}]/email"  value="<x:out select="$pro/email" />"/>
															</td>
															<td >
																	<c:set var="flag_corresponding" scope="page">
																	<x:out select="$pro/flag_corresponding_namne" />
																	</c:set>
																	 
																	<input type="checkbox"  class="checkbox"  maxlength="30" name="flag_corresponding" <c:if test="${flag_corresponding=='是'}">checked</c:if>  value=""/>
																	<input type="hidden" name="persons/person[${flag}${index}]/flag_corresponding_namne"  value="<x:out select="$pro/flag_corresponding_namne" />"/>
															</td>
															<td >
																	<c:set var="flag_own" scope="page">
																	<x:out select="$pro/flag_own_namne" />
																	</c:set>
																	 
																	<input type="radio"   class="radiobutton" maxlength="30" name="flag_own" <c:if test="${flag_own=='是'}">checked</c:if> value=""/>
																	<input type="hidden" name="persons/person[${flag}${index}]/flag_own_namne"  value="<x:out select="$pro/flag_own_namne" />"/>
															</td>
														
								    <c:set value="${index+1}" var="index" scope="page"/>
					                </x:forEach>
					             <script type="text/javascript">
					       	          showAllDateTag("tblMileStones");
					           </script>
						</table>
					<br>
					<table width="98%" align="center">
						<tr ><td>
						<input class="button" name="cmdAddbefore" id="cmdAddbeforePsn" type=button value="添加" onclick="if(1==1){addNewRow('tblResultPsns');}try{top.resizeFrame();}catch(e){};">
						<input class="button" name="cmdMovePrev" id="cmdMovePrevPsn" type=button value="上移" onclick="movePrev('tblResultPsns','selResultPsns')">
						<input class="button" name="cmdMoveNext" id="cmdMoveNextPsn" type=button value="下移" onclick="moveNext('tblResultPsns','selResultPsns')">
						<input class="button" name="cmddel" id="cmddelPsn" type=button  value="删除" onclick="deleteSelectedRow('tblResultPsns','记录')">
						</td>
					</tr>
					</table>
		</div>
		<table width="100%" align="center">
			<tr>
				<td>
					<input  type="button" class="button notdisabled" id="savePsn" value=" 保 存 "
						onclick="ValData();">
					<input class="button" type="button" value=" 关 闭 "
						onclick="parent.tb_remove();">
				</td>
			</tr>
		</table>
	</div>
  
  
  
  	<div id="zhuanli"  class="word_box" style="display: none">
  		<div id="tabnav">
					<ul>
						<li class="down" id="tab1" onclick="changeTab(this.id)"><a href="###"><span>基本信息</span>
						</a></li>
						<li id="tab2" onclick="changeTab(this.id)"><a href="###"><span>发明人</span>
						</a></li>
					</ul>
		</div>			
		<div class="tab_box" id="fragment-tab1">
		<table class="table01" cellpadding="0" cellspacing="0"  width="98%" align="center">
							<tr>
								<td colspan="5" class="TblHead">
									&nbsp;专利基本信息
									<input type="hidden" maxlength="30" value="${param.product_type_name}" name="product_type_name" style="width:420px">
								</td>
							</tr>
							<tr>
								<td  align="right" rowspan="2">
									<span class="color_red">*</span>专利名称：
								</td>
								<td align="center">
									中文
								</td>
								<td colspan="3">
									<input type="text" maxlength="200" value="" name="tname" style="width:420px">
								</td>
							</tr>
							<tr>
								<td align="center">
									外文
								</td>
								<td colspan="3">
									<input type="text" maxlength="200" value="" name="en_tname" style="width:420px">
								</td>
							</tr>
							<tr>
							<td align="right" colspan="2">
									<span class="color_red">*</span>申请（专利）号：
								</td>
								<td>
									<input type="text" value="" name="bname" style="width:195px" maxlength="100" class=" required" label="申请（专利）号">
								</td>
								<td  align="right">
									<span class="color_red">*</span>申请日期：
								</td>
								<td>
								
									<cpt:date id="sq_date"  value="" className="required date" label="申请日期"   name="sg_date"></cpt:date>
									
								</td>
								
							</tr>
							
							<tr>
							<td  align="right" colspan="2">
									<span class="color_red">*</span>专利类型：
								</td>
								<td colspan="3">
									<input type="radio" name="btype" id="btype" value="1" class="radioButton" onClick="setRadioSelectedValue(this.value,'btype_value','发明专利')"/>发明专利
									<input type="radio" name="btype" id="btype" value="2" class="radioButton" onClick="setRadioSelectedValue(this.value,'btype_value','实用新型')"/>实用新型
									<input type="radio" name="btype" id="btype" value="3" class="radioButton" onClick="setRadioSelectedValue(this.value,'btype_value','外观专利')"/>外观专利
									<input type="hidden" name="btype_name" id="btype_value_name" value=""/>
									<input type="hidden" name="btype_value" id="btype_value" value=""/>
								</td>
							</tr>
							
							
							<tr>
								<td  align="right" colspan="2">
									<span class="color_red">*</span>生效日期：
								</td>
								<td>
									<cpt:date id="sx_date"  value="" className="required date afterToday dateCompare:shix_date" label="生效日期"   name="sx_date"></cpt:date>
								</td>
								<td align="right" nowrap>
									<span class="color_red">*</span>失效日期：
								</td>
								<td>
									<cpt:date id="shix_date"  value="" className="required date" label="失效日期"   name="shix_date"></cpt:date>
								</td>
							</tr>
							
							<tr>
								<td  align="right" colspan="2">
									<span class="color_red">*</span>发证单位：
								</td>
								<td colspan="3">
									<input type="text" maxlength="100" value="" name="bj_jigou" style="width:420px" class=" required" label="发证单位">
								</td>
							</tr>
							
							<tr>
								<td align="right"  colspan="2">
									<span class="color_red">*</span>国家或地区：
								</td>
								<td>
									<input type="text" value="" name="country" maxlength="100" style="width:195px" class=" required" label="国家或地区">
								</td>
								<td align="right" nowrap>
									<span class="color_red">*</span>城市：
								</td>
								<td>
									<input type="text" value="" name="city" maxlength="100" style="width:195px" class=" required" label="城市">
								</td>
							</tr>
							<tr>
								<td align="right" rowspan="2">
									<span class="color_red">*</span>专利说明：<br>（限1000字）
								</td>
								<td align="center">
								中文
								</td>
								<td colspan="3">
								    <textarea name="miaosu" rows="5" cols="50" style="width:420px" class="input_textarea required" label="专利说明中文" onfocus="InitInput.setMaxLength(this,1000)"></textarea>
									 
								</td>
							</tr>
							<tr>
								<td align="center">
									外文
								</td>
								<td colspan="3">
								<textarea name="en_miaosu" rows="5" cols="50" style="width:420px" class="input_textarea required" label="专利说明外文" onfocus="InitInput.setMaxLength(this,1000)"></textarea>
								</td>
							</tr>
							<tr>
								<td align="right" rowspan="2">
									<span class="color_red">*</span>关键词：<br>（限1000字）
								</td>
								<td align="center">
								  中文
								</td>
								<td colspan="3">
								 <textarea name="keywords" rows="5" cols="50" style="width:420px" class="input_textarea required" label="关键词中文" onfocus="InitInput.setMaxLength(this,1000)"></textarea>
									
								</td>
							</tr>
							<tr>
								<td align="center">
									外文
								</td>
								<td colspan="3">
								<textarea name="en_keywords" rows="5" cols="50" style="width:420px" class="input_textarea required" label="关键词外文" onfocus="InitInput.setMaxLength(this,1000)"></textarea>
								</td>
							</tr>
							<tr>
								<td  align="right" colspan="2">
									备注(限250字)：
								</td>
								<td colspan="3">
									<textarea rows="5" cols="50" name="remark" style="width:420px" class="input_textarea required" label="备注" onfocus="InitInput.setMaxLength(this,250)"></textarea>
								</td>
							</tr>
							<tr>
								<td  align="right" colspan="2">
									全文链接：
								</td>
								<td colspan="3">
									<input type="text" value="" name="lianjie" style="width:420px" maxlength="100">
									<input type="hidden" value="" name="xmldata" style="width:420px">
									<input type="hidden" value="" name="psn_name" style="width:420px">
									<input type="hidden" value="" name="paiwei" style="width:420px">
									
								</td>
							</tr>
						</table>
		</div>
		
		<div class="tab_box" id="fragment-tab2" style="display: none">
			<table id="tblResultPsns1" class="table01" cellpadding="0" cellspacing="0"  width="98%" align="center">
							<tr >
								<td class="TblHead"  align="center" width="30px" >选择</td>
								<td class="TblHead"  align="center" width="25px" >序号</td>
								<td class="TblHead"  align="center" width="50px">姓名</td>
								<td class="TblHead" align="center" >所在单位</td>
								<td class="TblHead"  align="center" width="80px">电子邮箱</td>
								<td class="TblHead"  align="center" width="80px">是否本人</td>
							</tr>
					
							<tr style="display:none">
								<td  >
									<input type="radio" class="radiobutton" name="selResultPsns" >
								</td>
								<td >&nbsp;<span  name="persons|person[0]@seq_no" >[index]</span>
								<td><input type="text" value="" maxlength="10" name="persons|person[0]|cnamne" class=" required input_text" label="姓名"/></td>
								<td><input type="text" value="" maxlength="30" name="persons|person[0]|org_namne" class=" required input_text" label="所在单位"/></td> 
								<td><input type="text" value="" maxlength="30" name="persons|person[0]|email" class=" required email" label="电子邮箱"/></td>
								<td>
								<input type="radio" value=""  class="radiobutton" name="flag_own"/>
								<input type="hidden" name="persons|person[0]|flag_own_namne"/>
								</td>		
							</tr>
							
							
								<c:set value="0" var="index" scope="page" />
									<x:forEach select="$xmlData/data/persons/person" var="pro">
										
												<c:choose>
													<c:when test="${index<10}">
														<c:set value="0" var="flag" scope="page" />
													</c:when>
													<c:otherwise>
														<c:set value="" var="flag" scope="page" />
													</c:otherwise>
												</c:choose>
														<tr>
															<td >
															<input type="radio" class="radiobutton" name="selResultPsns" >
																
															</td>
															<td >
																&nbsp;
																<span name="persons/person[${flag}${index}]@seq_no"><x:out select="$pro/@seq_no"/></span>
															</td>
															<td >
																	<input type="text"  maxlength="10" name="persons/person[${flag}${index}]/cnamne" value="<x:out select="$pro/cnamne" />"/>
															</td>
															<td >
																	<input type="text"  maxlength="30" name="persons/person[${flag}${index}]/org_namne"  value="<x:out select="$pro/org_namne" />"/>
															</td>
															<td >
																	<input type="text" maxlength="30" name="persons/person[${flag}${index}]/email"  value="<x:out select="$pro/email" />"/>
															</td>
															<td >
																	<c:set var="flag_own" scope="page">
																	<x:out select="$pro/flag_own_namne" />
																	</c:set>
																	 
																	<input type="radio"   class="radiobutton" maxlength="30" name="flag_own" <c:if test="${flag_own=='是'}">checked</c:if> value=""/>
																	<input type="hidden" name="persons/person[${flag}${index}]/flag_own_namne"  value="<x:out select="$pro/flag_own_namne" />"/>
															</td>
															 <c:set value="${index+1}" var="index" scope="page"/>
					                                   </x:forEach>
					               <script type="text/javascript">
					       	          showAllDateTag("tblMileStones");
					               </script>
														
							
							
							
						</table>
					<br>
				
					<table width="98%" align="center">
						<tr ><td>
						<input class="button" name="cmdAddbefore" id="cmdAddbeforePsn" type=button value="添加" onclick="if(1==1){addNewRow('tblResultPsns1');}try{top.resizeFrame();}catch(e){};">
						<input class="button" name="cmdMovePrev" id="cmdMovePrevPsn" type=button value="上移" onclick="movePrev('tblResultPsns1','selResultPsns')">
						<input class="button" name="cmdMoveNext" id="cmdMoveNextPsn" type=button value="下移" onclick="moveNext('tblResultPsns1','selResultPsns')">
						<input class="button" name="cmddel" id="cmddelPsn" type=button  value="删除" onclick="deleteSelectedRow('tblResultPsns1','记录')">
						</td>
					</tr>
					</table>
		</div>
		<table width="100%" align="center">
			<tr>
				<td>
					<input  type="button" class="button notdisabled" id="savePsn" value=" 保 存 "
						onclick="ValData();">
					<input class="button" type="button" value=" 关 闭 "
						onclick="parent.tb_remove();">
				</td>
			</tr>
		</table>
		</div>




 	<div id="jiangli"  class="word_box" style="display: none">
  		<div id="tabnav">
					<ul>
						<li class="down" id="tab1" onclick="changeTab(this.id)"><a href="###"><span>基本信息</span>
						</a></li>
						<li id="tab2" onclick="changeTab(this.id)"><a href="###"><span>获奖人</span>
						</a></li>
					</ul>
		</div>			
		<div class="tab_box" id="fragment-tab1">
		<table class="table01" cellpadding="0" cellspacing="0"  width="98%" align="center">
							<tr>
								<td colspan="5" class="TblHead">
									&nbsp;奖励基本信息
									<input type="hidden" maxlength="30" value="${param.product_type_name}" name="product_type_name" style="width:520px">
								</td>
							</tr>
							<tr>
								<td align="right" rowspan="2" >
									<span class="color_red">*</span>获奖励目名称：
								</td>
								<td align="center">
								中文
								</td>
								<td colspan="3">
									<input type="text" value="" maxlength="200" name="tname" style="width:520px">
								</td>
							</tr>
							<tr>
								<td align="center">
									外文
								</td>
								<td colspan="3">
									<input type="text"  value="" maxlength="200" name="en_tname" style="width:520px">
								</td>
							</tr>
							<tr>
								<td  align="right" colspan="2">
									<span class="color_red">*</span>奖励类别：
								</td>
								<td  colspan="3">
									<input type="text" id="btype_value_name" name="btype_value_name" style="width:520px" maxlength="100"/>
								</td>
							</tr>
							<tr>
								<td  align="right" colspan="2">
									<span class="color_red">*</span>颁发日期：
								</td>
								<td>
								<cpt:date id="banjiang_date"  value="" className="required date" label="失效日期"   name="banjiang_date"></cpt:date>

								</td>
								<td align="right">
									<span class="color_red">*</span>奖励等级：
								</td>
								<td>
									<input type="text" value="" name="jl_dengji" style="width:185px" maxlength="100">
								</td>
							</tr>
							<tr>
								<td  align="right" colspan="2">
									<span class="color_red">*</span>颁奖机构：
								</td>
								<td>
									<input type="text" value="" name="bj_jigou" maxlength="100">
								</td>
								<td align="right">
									<span class="color_red">*</span>国家或地区：
								</td>
								<td>
									<input type="text" value="" name="country" style="width:185px" maxlength="100">
								</td>
							</tr>
							<tr>
								<td align="right" rowspan="2">
									<span class="color_red">*</span>描述：<br>（限1000字）
								</td>
								<td align="center">
								中文
								</td>
								<td colspan="3">
								    <textarea name="miaosu" rows="5" cols="50"></textarea>
									 
								</td>
							</tr>
							<tr>
								<td align="center">
									外文
								</td>
								<td colspan="3">
								<textarea name="en_miaosu" rows="5" cols="50"></textarea>
								</td>
							</tr>
							<tr>
								<td align="right" rowspan="2">
									<span class="color_red">*</span>关键词：<br>（限1000字）
								</td>
								<td align="center">
								  中文
								</td>
								<td colspan="3">
								 <textarea name="keywords" rows="5" cols="50"></textarea>
									
								</td>
							</tr>
							<tr>
								<td align="center">
									外文
								</td>
								<td colspan="3">
								<textarea name="en_keywords" rows="5" cols="50"></textarea>
								</td>
							</tr>
							<tr>
								<td  align="right" colspan="2">
									备注(限250字)：
								</td>
								<td colspan="3">
									<textarea rows="5" cols="50" name="remark"></textarea>
								</td>
							</tr>
							<tr>
								<td  align="right" colspan="2">
									全文链接：
								</td>
								<td colspan="3">
									<input type="text" value="" name="lianjie" style="width:520px" maxlength="100">
									<input type="hidden" value="" name="xmldata" style="width:520px">
									<input type="hidden" value="" name="psn_name" style="width:520px">
									<input type="hidden" value="" name="paiwei" style="width:520px">
									<input type="hidden" value="" name="paiwei_name" style="width:520px">
								</td>
							</tr>
						</table>
		</div>
		<div class="tab_box" id="fragment-tab2" style="display: none">
		<table id="tblResultPsns2" class="table01" cellpadding="0" cellspacing="0"  width="98%" align="center">
							<tr >
								
								<td class="TblHead"  align="center" width="30px" nowrap=true>选择</td>
								
								<td class="TblHead"  align="center" width="25px" nowrap=true>序号</td>
								<td class="TblHead"  align="center" width="50px">姓名</td>
								<td class="TblHead" align="center" >所在单位</td>
								<td class="TblHead"  align="center" width="80px">电子邮箱</td>
								<td class="TblHead"  align="center" width="80px">是否本人</td>
							</tr>
							
							<tr style="display:none">
								<td  nowrap=true>
									<input type="radio" class="radiobutton" name="selResultPsns" onclick="">
								</td>
								<td nowrap=true>&nbsp;<span  name="persons|person[0]|seq_no" >[index]</span></td>
								<td><input type="text" value="" maxlength="10" name="persons|person[0]|cnamne"/></td>
								<td><input type="text" value="" maxlength="30" name="persons|person[0]|org_namne"/></td> 
								<td><input type="text" value="" maxlength="30" name="persons|person[0]|email"/></td>
								<td>
								<input type="radio" value=""  class="radiobutton" name="flag_own"/>
								<input type="hidden" name="persons|person[0]|flag_own_namne"/>
								</td>		
							</tr>
							
								<c:set value="0" var="index" scope="page" />
									<x:forEach select="$xmlData/data/persons/person" var="pro">
										
												<c:choose>
													<c:when test="${index<10}">
														<c:set value="0" var="flag" scope="page" />
													</c:when>
													<c:otherwise>
														<c:set value="" var="flag" scope="page" />
													</c:otherwise>
												</c:choose>
														<tr>
															<td nowrap=true>
															<input type="radio" class="radiobutton" name="selResultPsns" onclick="">
																
															</td>
															<td nowrap=true>
																&nbsp;
																<span name="persons/person[${flag}${index}]@seq_no"><x:out select="$pro/@seq_no"/></span>
															</td>
															<td nowrap=true>
																	<input type="text"  maxlength="10" name="persons/person[${flag}${index}]/cnamne" value="<x:out select="$pro/cnamne" />"/>
															</td>
															<td nowrap=true>
																	<input type="text"  maxlength="30" name="persons/person[${flag}${index}]/org_namne"  value="<x:out select="$pro/org_namne" />"/>
															</td>
															<td nowrap=true>
																	<input type="text" maxlength="30" name="persons/person[${flag}${index}]/email"  value="<x:out select="$pro/email" />"/>
															</td>
															<td nowrap=true>
																	<c:set var="flag_own" scope="page">
																	<x:out select="$pro/flag_own_namne" />
																	</c:set>
																	 
																	<input type="radio"   class="radiobutton" maxlength="30" name="flag_own" <c:if test="${flag_own=='是'}">checked</c:if> value=""/>
																	<input type="hidden" name="persons/person[${flag}${index}]/flag_own_namne"  value="<x:out select="$pro/flag_own_namne" />"/>
															</td>
														<c:set value="${index+1}" var="index" scope="page" />
								     </x:forEach>
								     <script type="text/javascript">
					       	          showAllDateTag("tblMileStones");
					               </script>
							
						</table>
						<table width="98%" align="center">
						<tr ><td>
						<input class="button" name="cmdAddbefore" id="cmdAddbeforePsn" type=button value="添加" onclick="if(1==1){addNewRow('tblResultPsns2');}try{top.resizeFrame();}catch(e){};">
						<input class="button" name="cmdMovePrev" id="cmdMovePrevPsn" type=button value="上移" onclick="movePrev('tblResultPsns2','selResultPsns')">
						<input class="button" name="cmdMoveNext" id="cmdMoveNextPsn" type=button value="下移" onclick="moveNext('tblResultPsns2','selResultPsns')">
						<input class="button" name="cmddel" id="cmddelPsn" type=button  value="删除" onclick="deleteSelectedRow('tblResultPsns2','记录')">
						</td>
					</tr>
					</table>
		</div>
		</div>
  </body>
  <script type="text/javascript">
  
  function ValData()
	{	
	 
		savePsnName();//保存完成人
		savaPaiWei();//保存申请人排位
		setFlagName("flag_own");
		setFlagName("flag_corresponding");
		validate($("#fragment-tab1"),"基本信息");
		validateByTabRow($("#tblResultPsns"),"作者详情",1);
		if(document.getElementsByName("tname")[0].value == "" && document.getElementsByName("en_tname")[0].value == ""){
			irisValaddMsg("专利基本信息中的专利名称的中文与外文必须至少填写一个");
		}
		if(ValOwnFlag() == false){
			irisValaddMsg("作者详情中必须有本人的记录");
		}
		 
		if(!valResult()){
			irisValShowMsg($("#savePsn"));
			return false;
		}
		prpShowMsgDialog("处理成功",true);
		 
	
	}
	

//保存完成人
	function savePsnName()
	{
		var psnnames="";
		var tab=document.getElementById("tblResultPsns");
		for(var i = 2;i<tab.rows.length;i++){
			var temp=tab.rows[i].cells[2].childNodes[0].value;
			psnnames=psnnames+temp+"，";
		 }
		if(psnnames.length>1)psnnames=psnnames.substring(0,psnnames.length-1);
	   	document.getElementById("psn_name").value=psnnames;
	}
	//保存申请人排位
	function savaPaiWei()
	{
		var obj=document.getElementsByName("flag_own");
		var rownum;
		for(var i=0;i<obj.length;i++)
		{
			var temp=obj[i].checked;
			if(temp==true)
			{
				rownum=obj[i].parentElement.parentElement.rowIndex;
				var temp1=obj[i].parentElement.parentElement.cells[5].childNodes[0].checked;
				if(rownum=="2"&&temp1==true)
				{
					document.getElementById("paiwei").value="第一作者/通讯作者";
				}
				else if(rownum=="2"&&temp1==false)
				{	
					document.getElementById("paiwei").value="第一作者";
				}
				else if(rownum!="2"&&temp1==true)
				{
					document.getElementById("paiwei").value="通讯作者";
				}
				else
				{
					document.getElementById("paiwei").value="其他";
				}
				break;
			}
			else{
				document.getElementById("paiwei").value="";
			}
		}
	}
	//此函数，保存的时候，进行逐行保存是否通讯作者，是否本人用。
	function setFlagName(flag)
	{
		
		var flags=document.getElementsByName(flag);
		
		for(index=0;index<flags.length;index++)
		{
			obj=flags[index];//获取对象
			var objs=obj.parentElement.getElementsByTagName("*")
			for(i=0;i<objs.length;i++)
			{
				o=objs[i];
				if(o.name&&o.name.indexOf(flag+"_namne")>0&&o.name.indexOf("@")>0)
				{
					if(obj.checked)
					{
						o.value="是";
					}
					else
					{
						o.value="否";
					}
					break;
				}
			}
		}
	}
	
	function ValOwnFlag(){
		var rtnValue = false;
		var flags = document.getElementsByName("flag_own");	
		var len = flags.length;
		
		//有记录的才往下验证
		if(document.getElementById("tblResultPsns").rows.length < 3){
			return true;
		}
		
		for(var i=0;i<len;i++){
			if(flags[i].checked == true){
				rtnValue = true;
				break;
			}
		}
		return rtnValue;
	}
	
  </script>
</html>
